﻿using System;

namespace QDT.Core.Deals
{
    /// <summary>
    /// 债权人的回款记录
    /// </summary>
    public class RepayRecord : Entity, IAggregeRoot
    {
        public RepayRecord()
        {
            
        }

        /// <summary>
        /// 偿还模型Key
        /// </summary>
        public int Stage { get; set; }

        /// <summary>
        /// 债权ID
        /// </summary>
        public int UserId { get; set; }
        public int ProjectId { get; set; }

        /// <summary>
        /// 偿还的本金
        /// </summary>
        public decimal SelfMoney { get; set; }

        /// <summary>
        /// 偿还的本息(本金+利息)
        /// </summary>
        public decimal RepayMoney { get; set; }

        /// <summary>
        /// 管理费
        /// </summary>
        public decimal ManageMoney { get; set; }

        /// <summary>
        /// 逾期罚款
        /// </summary>
        public decimal ImposeMoney { get; set; }

        /// <summary>
        /// 正常偿还的时间
        /// </summary>
        public DateTime RepayTime { get; set; }

        /// <summary>
        /// 实际偿还的时间
        /// </summary>
        public DateTime TrueRepayTime { get; set; }

        /// <summary>
        /// 偿还状态
        /// </summary>
        public RepayStatus Status
        {
            get
            {
                return (RepayStatus)InnerStatus;
            }
            set { InnerStatus = (int)value; }
        }

        public int InnerStatus { get; set; }

        
    }
}
